window.onload = function(){
    let btn = document.querySelector("button")
    let btn_post = document.querySelector("#btn_post")

    btn.addEventListener("click",(e)=>{
        e.preventDefault()
        let username = document.getElementById("username").value
        let password = document.getElementById("password").value
        axios.get("http://172.19.11.61:8080/login",{
            params:{
                username:username,
                password:password
            }
        })
        .then((res)=>{
            console.log(res.data)
        })

    })

    btn_post.addEventListener("click",(e)=>{
        e.preventDefault()
        let user = document.getElementById("username").value
        let passw = document.getElementById("password").value 
        axios.get("http://172.19.11.61:8080/login",{
                username:user,
                password:passw
        })
        .then((res)=>{
            console.log(res.data)
        })
    })
}